﻿@{
    Layout = "~/Areas/CPP/Views/Shared/_MasterArticle.cshtml";
}
@model PagedList<ArticleInfo>
<div id="sw_mod_mainblock" class="sw-mod-mainblock sw-layout-mod">

    <div id="sw_mod_searchlist" class="sw-mod-search sw-layout-mod" style="width: 700px;">
        <div style="height: 36px; margin: 10px 0; border-bottom: 1px solid rgb(238,238,238);">
            <h3 style="font-weight: bold; font-size: 16px;">@ViewBag.Title</h3>
        </div>
        <ul class="sw-mod-popOfferImgs">
            @if (Model == null || Model.Count == 0)
            { 
                <li class="sw-mod-offer-block sw-block-photo">
                    <div id="sw_mod_noresult" style="margin-left: 60px;" class="sw-mod-noresult">
                        <div class="sw-ui-tip-sorry">
                            <div style="float: left; width: 80px; height: 70px; background-image: url(/Areas/CPP/Images/20130226160944.png);">
                            </div>

                        </div>
                        <ul class="sw-mod-noresult-suggestion" style="margin-left: 80px; margin-top: 10px;">
                            <li><span class="sw-ui-tip-sorry-des" style="font-size: 16px; margin-top: 20px; font-weight: bold;">抱歉，暂无内容。
                            </span></li>
                        </ul>
                    </div>
                </li>
            }
            @foreach (var item in Model)
            {
                <li class="sw-mod-offerImg sw-mod-checkbox-id paGetId " style="padding-left: 0px; min-height: 64px;">
                    <ul class="fd-clr">
                        <li class="sw-mod-offer-block sw-block-photo" style="display: none;">
                            <div class="sw-ui-photo100 sw-mod-checkbox-photo sw-mod-previewBigPhoto">
                                <a class="sw-ui-photo100-box" href="@Url.Action("Detail", "CArticle")?aid=@item.ContentId"
                                               target="_blank">
                                    <img src="@item.ImgUrl" width="100" height="100"  border="0" title="@item.Title" alt="@item.Title"/>
                                </a>

                            </div>
                        </li>
                        <li class="sw-mod-offer-block sw-block-description" style="width: 520px;">

                            <h2 class="sw-mod-offerImg-title">
                                <a class="sw-ui-font-title14" 
                                               href="@Url.Action("Detail", "CArticle")?aid=@item.ContentId" 
                                               target="_blank" title="@item.Title">@item.Title</a>
                            </h2>

                            <div class="sw-mod-offerImg-des">
                                <p style="text-indent: 2em;">
                                    @item.ArticleDetail.Content.RemoveHTML().Trim(85)
                                </p>
                            </div>



                        </li>
                        <li class="sw-mod-offer-block sw-block-company" style="width: 150px;">
                            <p style="text-align: center;">
                                @item.ReleaseDate.ToString("yyyy-MM-dd HH:mm:ss")
                            </p>
                        </li>
                    </ul>
                </li>
            }
        </ul>
    </div>
    <div id="sw_mod_sub" class="sw-layout-sub" style="width: 227px;">
        <div class="loadingicon" id="col-loading"></div>
        <div class="delayshow" id="col-delayshow">
            @{  Html.RenderAction("Advert", "CPartial", new { floor = "PT" }); }
        </div>
    </div>
</div>

<div id="sw_mod_pagination" class="sw-mod-pagination sw-layout-mod">
    <div class="pagination">
        @Html.Pager(Model, new Webdiyer.WebControls.Mvc.PagerOptions()
                        {
                            PageIndexParameterName = "page",
                            NumericPagerItemCount = 9,
                            AutoHide = true,
                            CssClass = "page-bottom",
                            CurrentPagerItemWrapperFormatString = "<span class='page-cur'>{0}</span>",
                            SeparatorHtml = "",
                            ContainerTagName = "div",
                            ShowFirstLast = false,
                        })
        <script type="text/javascript">
            $(function () {
                $(".page-bottom a").filter(function (index) {
                    return $(this).text() == "下一页";
                }).addClass("page-next");
            });
        </script>
    </div>
</div>


